<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>订单查看</title>
<link href="/css/order_info.css" rel="stylesheet" type="text/css" />
    <script src="/js/jquery.js" ></script>
</head>
<body bgcolor="#f9fafc">
<div class="order_crumb"></font>当前单号：${order.id}<font></div>
<div class="order_information mt20 clear">
    <div class="dd_fkxx">
        <div class="dd_fkxx_title">订单信息</div>
        <ul>
            <li>创建时间： <#if order.create_time??>
            ${order.create_time?string("yyyy年MM月dd日HH时mm分ss秒") }
            </#if>
            </li>
            <li>订单类型：<#if order.order_category_type ??>
                <#list session.orderTypeMapList as orderType>
                    <#if orderType.value == order.order_category_type>
                    ${orderType.name}
                    </#if>
                </#list>
            </#if>
            </li>
            <li>订单来源： <#list session.telLists as tel>
                <#if tel.company ??>
                    <#if order.source==tel.company>
                    ${tel.companyname!""}
                    </#if>
                </#if>
            </#list>
            </li>
            <li>代驾地点： ${order.real_name2!""}</li>
            <li>预约时间：<#if order.arrived_time??>${order.arrived_time?string("MM/dd HH:mm")} </#if></li>
            <li>客户姓名：${order.real_name!""}</li>
            <li>客户手机：${order.cell_phone!""}</li>
            <li>当前状态：<#list session.orderStatusTypeArray as orderStatusType>
                <#if orderStatusType.orderStatus == order.order_state>
                ${orderStatusType.orderName}
                </#if>
            </#list>
            </li>
            <li>订单备注：${order.remark!" "}</li>
        </ul>
    </div>
    <div class="dd_fkxx">
        <div class="dd_fkxx_title">付款信息</div>
        <ul>
            <li>等待时间：2015/03/12 19:09</li>
            <li>代驾开始时间：<#if order.driver_begin_time??>
                                ${order.driver_begin_time?string("MM/dd HH:mm")}
                            </#if>
            </li>
            <li>代驾结束时间： <#if order.driver_finish_time??>
                                ${order.driver_finish_time?string("yyyy年MM月dd日HH时mm分ss秒") }
                            </#if>
            </li>
            <li>行驶公里：${order.kilometre!""}</li>
            <li>应收金额：${order.totalmoney!""}</li>
            <li>实收金额：<#if order.charges??>
                            ${order.charges?string(",##0.0#")}
                            <#else>
                                0.0
                            </#if><#if order.order_state==4>
                                    <a href="/order/editOrder/${order.id}">修改</a>
                            </#if>
                </li>
            <li>付款方式：<#if order.pay_type??>
                <#if order.pay_type == 0>
                    <span class="label label-info">现金</span>
                <#elseif order.pay_type == 1>
                    <span class="label label-warning">企业支付</span>
                <#elseif order.pay_type == 2>
                    <span class="label label-success">VIP支付</span>
                <#elseif order.pay_type == 3>
                    <span class="label label-success">免费客户</span>
                <#else>
                    <span class="label label-inverse">其他</span>
                </#if>
            </#if>
            </li>
        </ul>
    </div>
</div>
<div class="clear"></div>
<div class="order_main m10">

  <div class="order_step">
    <p class="order_bg"></p>
    <div class="order_step_item">
    <#if order.order_state<2||order.order_state==6>
        <p class="order_name blue">客户下单<span></span></p>
     <#else>
         <p class="order_name gray">客户下单<span></span></p>
     </#if>
      <p class="order_time"><#if order.create_time??>
                         ${order.create_time?string("MM/dd HH:mm")}
                        </#if></p>
    </div>

            <#if 1<order.order_state>
                <div class="order_step_item">
                <#if 2==order.order_state>
                         <p class="order_name blue">司机已到达<span></span></p>
                    <#else>
                        <p class="order_name gray">司机已到达<span></span></p>
                </#if>
                  <p class="order_time"><#if order.accept_time??>
                         ${order.accept_time?string("MM/dd HH:mm")}
                        </#if>
                  </p>
                </div>
                <#if 2<order.order_state>
                    <div class="order_step_item">
                    <#if 3==order.order_state>
                            <p class="order_name blue">开始代驾<span></span></p>
                        <#else>
                            <p class="order_name gray">开始代驾<span></span></p>
                    </#if>
                      <p class="order_time"><#if order.driver_begin_time??>
                               ${order.driver_begin_time?string("MM/dd HH:mm")}
                              </#if></p>
                    </div>
                   <#if 3<order.order_state>
                        <div class="order_step_item">
                       <#if 4==order.order_state>
                          <p class="order_name blue">已结算<span></span></p>
                       <#else >
                           <p class="order_name gray">已结算<span></span></p>
                       </#if>
                          <p class="order_time"><#if order.driver_finish_time??>
                               ${order.driver_finish_time?string("MM/dd HH:mm")}
                              </#if></p>
                        </div>
                   </#if>
                </#if>
            </#if>
  </div>
  <div class="order_tab">
    <ul class="clear">
      <li class="cur" reid="id_order_num">订单跟踪</li>
      <li reid="id_order_trajectory">订单轨迹</li>
    </ul>
  </div>
  <div class="tab_content">
    <div class="order_num order_tab_item" id="id_order_num">
      <div class="order_num_title"><span>时间</span>
        <p>跟踪信息</p>
      </div>
      <ul>
        <#if order.create_time??>
            <li><span>${order.create_time?string("MM/dd HH:mm")} </span>
              <p>客户[${order.real_name!""}]下单</p>
            </li>
        </#if>
        <#if order.accept_time??>
            <li><span>${order.accept_time?string("MM/dd HH:mm")}</span>
              <p>司机[${driver_name!" "}]抢单</p>
            </li>
        </#if>
        <#if order.arrived_time??>
            <li><span>${order.arrived_time?string("MM/dd HH:mm")}</span>
                <p>司机[${driver_name!" "}]到达时间</p>
            </li>
        </#if>
        <#if order.driver_begin_time??>
            <li><span>${order.driver_begin_time?string("MM/dd HH:mm")}</span>
                <p>司机[${driver_name!" "}]开始前往客户目的地</p>
            </li>
        </#if>
        <#if order.driver_finish_time??>
            <li><span>${order.driver_finish_time?string("MM/dd HH:mm")}</span>
                <p>司机[${driver_name!" "}]到达客户目的地</p>
            </li>
        </#if>
      </ul>
    </div>

    <div class="order_trajectory order_tab_item hidden" id="id_order_trajectory">
        <iframe frameborder="0" src="" height="800" width="100%"></iframe>

    </div>

    <div class="order_back_btn">
      <input name="" type="button" onclick="history.go(-1)" value="返回" />
    </div>
  </div>
</div>
<script type="text/javascript">
    $(function(){
        $(".order_tab li").click(function(){
            if($(this).hasClass("cur")){
                return;
            }
            $(".order_tab li").removeClass("cur");
            $(this).addClass("cur");
            $(".order_tab_item").addClass("hidden");
            var reid=$(this).attr("reid");
            $("#"+reid).removeClass("hidden");
            if(reid=="id_order_trajectory"){
                if($("#"+reid).attr("init")=="1")
                    return;
                else{
                    $("#"+reid).attr("init","1");
                    $("#"+reid+" iframe").attr("src","/order/trajectory/${order.id}");
                }
            }

        });
    })


</script>
</body>
</html>
